package ar.uba.fi.taller2.ftrs.WebService;

import java.io.FileWriter;
import java.io.IOException;



import com.sun.org.apache.xerces.internal.xni.XMLLocator;

public class WebService {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		//get a factory
		Parser p=new Parser();

		
		try {
			FileWriter file;
			file = new FileWriter("./svg/arbol.xml");
		
		System.out.println(p.crear("BP",4));

		//System.out.println(p.imprimir("1"));
		System.out.println(p.agregar("1", "1"));
		System.out.println(p.agregar("1", "2"));
		System.out.println(p.agregar("1", "6"));
		System.out.println(p.agregar("1", "7"));
		System.out.println(p.agregar("1", "8"));
		System.out.println(p.agregar("1", "9"));
		System.out.println(p.agregar("1", "10"));
		System.out.println(p.agregar("1", "11"));
		System.out.println(p.agregar("1", "12"));
		System.out.println(p.agregar("1", "13"));
		System.out.println(p.agregar("1", "14"));
		System.out.println(p.agregar("1", null));
		System.out.println(p.agregar("1", null));
		System.out.println(p.agregar("1", null));
		System.out.println(p.agregar("1", null));
		System.out.println(p.agregar("1", null));
		System.out.println(p.agregar("1", null));
		System.out.println(p.agregar("1", null));
		System.out.println(p.agregar("1", null));
		System.out.println(p.agregar("1", null));
		System.out.println(p.agregar("1", null));
		System.out.println(p.agregar("1", null));
		System.out.println(p.agregar("1", null));
		System.out.println(p.agregar("1", null));
		System.out.println(p.agregar("1", null));
		System.out.println(p.agregar("1", null));
		System.out.println(p.agregar("1", null));
		System.out.println(p.agregar("1", null));
		System.out.println(p.agregar("1", null));
		System.out.println(p.agregar("1", null));
		System.out.println(p.agregar("1", null));
		System.out.println(p.agregar("1", null));
		System.out.println(p.agregar("1", null));

		



		


		


		 System.out.println(p.imprimir("1"));
			file.write(p.imprimir("1"));
		
			file.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		/*System.out.println(p.quitar("1", "9"));
		System.out.println(p.imprimir("1"));
		System.out.println(p.quitar("1", "7"));
		System.out.println(p.imprimir("1"));
		System.out.println(p.quitar("1", "11"));
		System.out.println(p.imprimir("1"));
		System.out.println(p.quitar("1", "12"));	
		System.out.println(p.imprimir("1"));
		System.out.println(p.quitar("1", "7"));
		System.out.println(p.imprimir("1"));
		System.out.println(p.quitar("1", "6"));
		System.out.println(p.imprimir("1"));*/
	/*	System.out.println(p.agregar("1", "2"));
	System.out.println(p.quitar("1", "2"));
		System.out.println(p.agregar("1", "3"));
		
		System.out.println(p.agregar("1", "4"));
		System.out.println(p.agregar("1", "5"));
		System.out.println(p.agregar("1", "6"));
		System.out.println(p.agregar("1", "7"));
		System.out.println(p.agregar("1", "8"));
		System.out.println(p.agregar("1", "9"));
		System.out.println(p.agregar("1", "10"));
		System.out.println(p.agregar("1", "11"));
		System.out.println(p.agregar("1", "12"));
		System.out.println(p.agregar("1", "13"));
		System.out.println(p.agregar("1", "14"));
		System.out.println(p.agregar("1", "15"));
		System.out.println(p.agregar("1", "16"));
		System.out.println(p.agregar("1", "17"));
		System.out.println(p.agregar("1", "18"));
		System.out.println(p.agregar("1", "19"));
		System.out.println(p.imprimir("1"));
		System.out.println(p.quitar("1", "5"));
		System.out.println(p.imprimir("1"));
		System.out.println(p.destruir("1"));
		System.out.println(p.imprimir("1"));*/
		
//		DrawTag. ppp=new DrawTag ();
		
//		Parser p= new Parser();
//		p.parseXmlFile("crear.xml");
//		System.out.println(p.execute());
//		p.parseXmlFile("agregar.xml");
//		System.out.println(p.execute());
//		p.parseXmlFile("imprimir.xml");
//		System.out.println(p.execute());*/
	

	}
	




}
